package org.starlight.user.controller;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.*;
import org.starlight.user.entity.Ent;
import org.starlight.user.serivce.EntService;

/**
 * 企业服务
 *
 * @author huangyong
 * @data 2025/2/28
 */
@Tag(name = "企业服务", description = "企业服务")
@RestController
@RequiredArgsConstructor
@RequestMapping("/ent")
public class EntController {
    private final EntService entityService;

    @Operation(summary = "保存企业")
    @ResponseStatus(HttpStatus.OK)
    @PostMapping
    public void save(Ent ent) {
        entityService.save(ent);
    }

    @Operation(summary = "删除企业")
    @ResponseStatus(HttpStatus.OK)
    @GetMapping("/{id}")
    public void del(@PathVariable Integer id) {
        entityService.del(id);
    }

}
